package main

import (
	"flag"
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/logs"
	_ "monitor_agent/apps/cpu"
	_ "monitor_agent/apps/filesystems"
	_ "monitor_agent/apps/memory"
	_ "monitor_agent/apps/net"
	_ "monitor_agent/apps/processes"
	_ "monitor_agent/apps/system"
)

var configFile = flag.String("config", "./conf/app.ini", "配置路径")

func init() {
	flag.Parse()
}

func main() {
	err := beego.LoadAppConfig("ini", *configFile)
	if err == nil {
		beego.Run()
	} else {
		logs.Error(err)
	}
}
